package back.重写;

public class Father {
    public static void main(String[] args) {
        Son s = new Son();
        s.sayHello();
    }

    public void sayHello() {
        System.out.println("Hello");
    }
}

class Son extends Father {

    @Override
    public void sayHello() {
        System.out.println("hello by Son");
    }
}